package com.minelx.woods.server.dao;

import java.util.Objects;

public final class UserDTO {
	private final String name;

	private final String password;

	public UserDTO(String name, String password) {
		this.name = name;
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public String getPassword() {
		return password;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		UserDTO userDTO = (UserDTO) o;
		return name.equals(userDTO.name) && password.equals(userDTO.password);
	}

	@Override
	public int hashCode() {
		return Objects.hash(name, password);
	}

	@Override
	public String toString() {
		return "UserDTO{" +
				"name='" + name + '\'' +
				", password='" + password + '\'' +
				'}';
	}
}
